﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditCourse.aspx.cs" Inherits="User_EditCourse" MasterPageFile="../MasterPage.master" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="CourseEdit">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="select * from courses"></asp:SqlDataSource>
    <h2 style="text-align: center">Edit Details <asp:Label ID="lbSourseName" runat="server" Text="Label"></asp:Label></h2>
    
    <div>
        <table style="width: 100%">
            <tr>
                <td class="columnview1">Name :</td>
                <td>
                    <asp:TextBox ID="txtNameS" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="columnview1">Teacher :</td>
                <td>
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="name" DataValueField="id">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="select id, name from users where role_id = 1"></asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="columnview1">Class Name :</td>
                <td>
                    <asp:TextBox ID="txtClassName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="columnview1">Start date :</td>
                <td>
                    <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="columnview1">End date :</td>
                <td>
                    <asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="columnview1">Cost :</td>
                <td>
                    <asp:TextBox ID="txtCost" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="columnview1">Description :</td>
                <td>
                    <asp:TextBox ID="txtDers" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>

    </div>
    </div>
    <div style="margin-top: 30px;">
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="Update"/>
    </div>

    </asp:Content>
